{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 阈值的选取"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\annaconda\\lib\\site-packages\\sklearn\\linear_model\\_logistic.py:940: ConvergenceWarning: lbfgs failed to converge (status=1):\n",
      "STOP: TOTAL NO. of ITERATIONS REACHED LIMIT.\n",
      "\n",
      "Increase the number of iterations (max_iter) or scale the data as shown in:\n",
      "    https://scikit-learn.org/stable/modules/preprocessing.html\n",
      "Please also refer to the documentation for alternative solver options:\n",
      "    https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression\n",
      "  extra_warning_msg=_LOGISTIC_SOLVER_CONVERGENCE_MSG)\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn import datasets\n",
    "\n",
    "digits = datasets.load_digits()\n",
    "X = digits.data\n",
    "y = digits.target.copy()\n",
    "\n",
    "y[digits.target==9] = 1\n",
    "y[digits.target!=9] = 0\n",
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=666)\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "\n",
    "log_reg = LogisticRegression()\n",
    "log_reg.fit(X_train, y_train)\n",
    "decision_scores = log_reg.decision_function(X_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.metrics import precision_score\n",
    "from sklearn.metrics import recall_score\n",
    "precisions = []\n",
    "recalls = []\n",
    "thresholds = np.arange(np.min(decision_scores), np.max(decision_scores), 0.1)  #步长0.1\n",
    "\n",
    "for threshold in thresholds:\n",
    "    y_predict = np.array(decision_scores >= threshold, dtype='int')\n",
    "    precisions.append(precision_score(y_test, y_predict))\n",
    "    recalls.append(recall_score(y_test, y_predict))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0xc8455ca0c8>]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3deXgc1Z3u8e+vW0tLshbbkncbeQcDZhNm35dASGDIQoCEkEBCbgIh6ySQ5DIzhMxkYwi5w0xYJyEzDGsCnokzJgTCFoxtjA0YYyNsbMurvGmx1K1ezv2jWkaWZakldavU3e/nefqp6upS9a/oh5fDqapzzDmHiIhkv4DfBYiISHoo0EVEcoQCXUQkRyjQRURyhAJdRCRHFPj1xdXV1a62ttavrxcRyUqvvfbaDudcTU+f+RbotbW1LF261K+vFxHJSma2/mCfqctFRCRHKNBFRHKEAl1EJEco0EVEcoQCXUQkR/QZ6Gb2gJltN7O3DvK5mdkvzazezN4ws2PTX6aIiPQllRb6r4ELevn8QmBm8nUd8G+DL0tERPqrz/vQnXMvmFltL7tcAjzovHF4F5lZlZmNd85tSVON+1v/Crz3bEYOLZLVLABHXwEja/2uxHePLt1Iw642v8s4qHMOG8tRk6vSftx0PFg0EdjY5X1DctsBgW5m1+G14pkyZcrAvq1hMbzws4H9rUhOcxBtg/N/6HchvtobifGdx98AwMznYg5iTEVo2AZ6T//Iepw1wzl3D3APQF1d3cBm1jjla95LRPZ3+6HQvtvvKnwXjsYBuPWSw/nsSbX+FjPE0nGXSwMwucv7ScDmNBxXRPojVAnhJr+r8F0klgCguCD/buJLxxnPBz6bvNvlRKApY/3nInJwoSqvhR6PQSLudzW++SDQgz5XMvT67HIxs/8CzgSqzawB+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rsd+VcC70PXwTuTE6TFwauS25fgHdnRD3QBnzen/LS5gHgATN7C+gArk627Faa2aPA23j/+369cy7uY52Zkku/57/g3cnyp+T/iSxyzv0f500ykzO/pTvIRDo+l5UupwBXAW+a2fLktu8BP8brDr0W2EAa5pTQo/8iIjki37pcRERylgJdRCRHKNBFRHKEAl1EJEco0EVEcoQCXUQkRyjQRURyxP8HsXa47m/pthQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(thresholds, precisions)\n",
    "plt.plot(thresholds, recalls)         #随着阈值的变化，精准率和召回率的变化"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 精准率-召回率曲线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0xc848e30fc8>]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAU2UlEQVR4nO3dfXBd9X3n8ffXsmUjYwxYNg9+QCSYhIdu4qBlIWTCU5oS/sDJTsjCJkOSMqHTLd2ZTbaz7GSHdsl2ZxqmkzYdaOvtpgmdJkAz29TLusNuidm0AVKLUFgwkBowWLbBwrLlB1mSJX33jysa2cjSkfVw7j16v2Y0c889v3vOlx/yxz//7u+cE5mJJKnxzSu7AEnS9DDQJakiDHRJqggDXZIqwkCXpIqYX9aJW1tbs62trazTS1JDevrpp9/OzOVj7Sst0Nva2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ior0x+3AwwCZ+SSwiNqNquaiQtkyGQb6xCZ8wMfINMMfUwvzKs+RjtsXmdmTma2Z2ZaZbdS+T7gpMzvKKXfGFXn4yw+ofWlORLRSm4J5dVarnD1F+uMN4HqAiLiIWqDP1QcMbwRuG1ntcgXQk5m7p3JAp1wmkMUe8HEvcCrwFxEB8EZm3lRa0TOkYF/MGQX741Hg4xGxFRgCfiMz95ZX9cwp2B9fAf5bRPw7atMLX8iRJR9VExHfozbV1jryncFvAgsAMvOPqH2HcCOwDegFvjjlc1a0LyVpznHKRZIqwkCXpIow0CWpIgx0SaoIA12SKsJAl6SKMNAlqSL+P/X5AxSIQyCRAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(precisions, recalls)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### sklearn中的Precision-Recall曲线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.metrics import precision_recall_curve\n",
    "precisions, recalls, thresholds = precision_recall_curve(y_test, decision_scores)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(151,)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "precisions.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(151,)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "recalls.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(150,)"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "thresholds.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0xc848e4da08>]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3deXiU1d3/8fc3+0IWQgIEQghLwiqyhEVQERHFFWtFsbgv2FaqVmu1dau2v9rq81SfuiFWcAd3RYuiIIiAAkH2NWEPWxKWQAjZz++Pe9AQEzLATM4s39d1zTWZmTszH8bh4+HMfd9HjDEopZTyfyG2AyillPIMLXSllAoQWuhKKRUgtNCVUipAaKErpVSACLP1wsnJySYjI8PWyyullF9asmRJkTEmpb7HrBV6RkYGOTk5tl5eKaX8kohsbegxnXJRSqkAoYWulFIBQgtdKaUChBa6UkoFCC10pZQKEI0WuohMEpECEVnVwOMiIv8WkTwRWSEifT0fUymlVGPcGaG/Cow8zuMXApmuyzjgxVOPpZRS6kQ1uh+6MWauiGQcZ5NRwOvGOQ/v9yKSKCKpxphdHsp4rK3fQe4MGP4oiHjlJZTyVat3FjNj1W7bMdQpGt6tFae3S/T483riwKK2wPZat/Nd9/2s0EVkHM4onvT09JN7tZ0/wLynYcjdEO35N0QpX/binI18tmKXjmX8XMv4KJ8t9Po+WvWummGMmQhMBMjOzj65lTViWjjXpXu10FXQqao2dGkVx4zfn207ivJBntjLJR9oV+t2GrDTA89bv5hk57p0r9deQilfVWOMjs5VgzxR6NOA6117uwwCir02fw4Qk+RclxRAdVXDF11aTwWgGgMh2uiqAY1OuYjIFOAcIFlE8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s5TT76Ors/ectfn0GcyAlNwpiwqXZ/JW3AWf58F5Lquk3wwo099JoEzcab6VgDLXJeLvPFe6qH/SikVIIJ+ykUppQKFFrpSSgUILXSllAoQWuhKKRUgtNCVUipAaKErpVSA0EJXSqkA8f8BpmIJBNY3ScIAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(thresholds, precisions[:-1])\n",
    "plt.plot(thresholds, recalls[:-1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0xc848cf7388>]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAVuklEQVR4nO3dfZAc9X3n8fd3V08gJAHSIkAPSJgVQea4AvYA2znM2dgncAIX4/jQXS4hha1zKuC6s506ruwiDrlLwFRC2XXKOQrxYbvOcNjlimUiTBIeQkwZBzkgjAAJIYG1CEkrIaTV6ln63h87IstqtdMrzezMtN6vqq3qnv5tz2e7pj7V293THZmJJKn1tTU6gCSpNix0SSoJC12SSsJCl6SSsNAlqSTGNOqNp02blnPmzGnU20tSS/rZz362JTM7hlrWsEKfM2cOy5cvb9TbS1JLiojXj7bMQy6SVBIWuiSVhIUuSSVhoUtSSVjoklQSVQs9Ir4REZsj4oWjLI+I+FpErImI5yPiktrHlCRVU2QP/T5gwTDLrwE6Kz+LgP99/LEkSSNVtdAz80ngrWGGXA98K/s9DZwaEW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cB6yiv+BH20g+szfSuMMtUCzrzcCDAJn5E2AC/TeXGm1FPrMbMvPjmXkx8MXKa9tHL+KIjLTbqmvUCYMRnFgYA6yl/9/SwydC3jtoTOeA6V+l/1mnTZl10PgnaNxJ0SLb9awB078GPN3kn4MFwDcr09Po/3d2ajNmrYw7H3iNyhf8mni7PgzcVJm+gP7SGfXMBbNOA9oq0/8TuKNR27aSYQ5HPyn6Md59UvQfj/v9GvnHjmCjXAuspv8M9xcrr90BXFeZ/iqwEniO/hMhRy3RRmcdNLZhhV5wu/5xZbuuqGzXX2ryz0EAfwq8CPwcuLFZs1bmvwzc2chtWnC7zgeeqnwOngM+2sRZPwG8UhlzLzC+gVnvB94E9tO/N34z8BngM5XlASyu/C0/r0UX+NV/SSqJVjiGLkkqwEKXpJKw0CWpJCx0SSoJC12SSsJCl6SSsNAlqST+PxTQc1RV3mC3AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(precisions, recalls)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
